package com.example.sys.entity.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;
import lombok.ToString;

/**
 * @author ZhengDing
 * @date 2022/1/28 11:37
 */

public enum GradeEnum {

    PRIMARY(1000, "小学"),
    SECONDARY(1001, "中学"),
    HIGH(1002, "高中");

    GradeEnum(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    @EnumValue//标记数据库存的值是code
    private final int code;

    @JsonValue
    private final String desc;

    //@Override
    //public String toString() {
    //    return this.desc;
    //}
}
